<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>   
<script>
$(function() {	
		var m_os="${os}";
		if(m_os=='wechat' || m_os=='web'){
			 $(".btn-popup").bind("click",function(){
			    $(".bg-popup").fadeIn(500);
			    $("#popup").animate({top:'7%'},200);
			});
		}else{
			 $(".btn-popup").bind("click",function(){
			    $(".bg-popup").fadeIn(500);
			    $("#popup").animate({top:'0%'},200);
			});
		}
		$(".bg-popup").bind("click",function(){
		   $("#popup").animate({top:'-100%'},200);
		    $(this).fadeOut(500);
		});
		$(".btn-popup-2").bind("click",function(){
		   $("#popup").animate({top:'-100%'},200);
		    $(".bg-popup").fadeOut(500);
		});
		
	  var $items = $('.popup-content>ul.common>li');
	  $items.click(function() {
	    $items.removeClass('on');
	    $(this).addClass('on');

	    var index = $items.index($(this));
	    $('.popup-content>.show-content').hide().eq(index).show();
	  }).eq(0).click();	 
	});
</script>
<input type="hidden"  id="incomeAndExpensesLogOne_url" value="${incomeAndExpensesLogOne_url }">
    <div id="main">
        <div class="popup-content2">
            <div class="clearfix">
	            <h4 class="leftArea">
	            	<c:if test="${bill_type == null||bill_type==''}"><span>全部</span></c:if>
	            	<c:if test="${bill_type == 1}"><span>支出&nbsp;></span></c:if>
	            	<c:if test="${bill_type == 2}"><span>收入&nbsp;></span></c:if>
	            	<c:if test="${type == 1}"><span>余额充值</span></c:if>
	            	<c:if test="${type == 3}"><span>退款</span></c:if>
 					<c:if test="${type == 4}"><span>余额提现</span></c:if>
	            	<c:if test="${type == 5}"><span>购物</span></c:if>
	            	<c:if test="${type == 6}"><span>${ticket_name}充值</span></c:if>
	            	<c:if test="${type == 2}"><span>${awardName}</span></c:if>
	            </h4>
	            <p class="rightArea btn-popup"><span class="btn-popup">筛选</span></p>
            </div>
        </div>
        <div class="content2" id="listSelect">
           <ul id="logSelect">
           	 <c:forEach items="${incomeAndExpensesList}" var="c">
                  <c:if test="${c.free_cash != 0.00 }">
                   	 <c:if test="${'ios'==os}">
				   		  <li class="clearfix" onclick="GetToken(${c.income_and_expenses_id})">
		             </c:if>
                   	 <c:if test="${'wechat'==os ||'web'==os}">
				   		   <li class="clearfix" onclick="GetDetail('${c.income_and_expenses_id}')">
		             </c:if>
		    	     <c:if test="${'android'==os}">
		            	<li class="clearfix" onclick="android.startUrl('交易明细','${incomeAndExpensesLogOne_url}','incomeAndExpenses_id->${c.income_and_expenses_id}')">
		             </c:if>
                       <p class="leftArea">
                        <c:if test="${c.type==1 and c.pay_type ==null}"><span>离线充值</span><br></c:if>
	                    <c:if test="${c.type==1 and c.pay_type !=null}"><span>余额充值</span><br></c:if>
                       	<c:if test="${c.type==2 }"><span>${c.award_name}</span><br></c:if>
                       	<c:if test="${c.type==3 }"><span>退款</span><br></c:if>
                       	<c:if test="${c.type==4 and c.state == 2 and c.log_cash_draw_state == 0}"><span>余额提现(提现中)</span><br></c:if>  
			        	<c:if test="${c.type==4 and c.state == 2 and c.log_cash_draw_state ==1}"><span>余额提现</span><br></c:if> 
			        	<c:if test="${c.type==4 and c.state == 2 and c.log_cash_draw_state ==2}"><span>余额提现(提现失败)</span><br></c:if>   
                       	<c:if test="${c.type==5 }"><span>购物&nbsp;（订单号：${c.order_no}）</span><br></c:if>
                       	<c:if test="${c.type==6 }"><span>${ticket_name}充值</span><br></c:if>
                       	<fmt:parseDate value=" ${c.create_time}" var="date" pattern="yyyy-MM-dd HH:mm:ss"/>  
			  			<span class="time"><fmt:formatDate value="${date}" pattern="yyyy-MM-dd HH:mm" /></span> 
                       </p>
                       <p class="rightArea <c:if test="${c.bill_type == 2 }">col-arresting</c:if>">
                        <c:if test="${c.bill_type == 1 }">-</c:if>
                        <c:if test="${c.bill_type == 2 }">+</c:if>
                        <c:if test="${memberId !='758' }"> 
	                           <fmt:formatNumber value="${c.free_cash-c.special_pay_back}" pattern="#0.00" maxFractionDigits="2"/>
						</c:if> 
						<c:if test="${memberId =='758' }"> 
	                           <fmt:formatNumber value="${c.free_cash}" pattern="#0.00" maxFractionDigits="2"/>
						</c:if> 
                       </p>
                   </li>
                   </c:if> 
               	</c:forEach>
            </ul>
        </div>
	<div class="bg-popup"></div>
    <div id="popup">
        <div class="popup-content">
            <div class="clearfix"><h4 class="leftArea"><span>请选择您要筛选的分类</span></h4><p class="rightArea"><span class="btn-popup-2">筛选</span></p></div>
            <ul class="one whole common">
                <li class="whole-one"><span>全部</span></li>
                <li><span>收入</span></li>
                <li><span>支出</span></li>
            </ul>
            <ul class="show-content">
                <li class="whole-one" onclick="getList('','','')"><span>全部</span></li>
                <li class="whole-two" onclick="getList(2,'','')"><span>收入</span></li>
                <li class="whole-there" onclick="getList(1,'','')"><span>支出</span></li>
            </ul>
            <ul class="show-content">
                <li class="whole-one" onclick="getList(2,'',1)"><span>余额充值</span></li>
                 <c:if test="${awardList.size()>0}">
	                <c:forEach items="${awardList}" var="c">
	                	<li class="whole-two" onclick="getList(2,${c.awardId},2)"><span>${c.name}</span></li>
	                </c:forEach>
                </c:if>
                <li class="whole-two" onclick="getList(2,'',3)"><span>退款</span></li>
            </ul>
            <ul class="show-content">
                <li class="whole-one" onclick="getList(1,'',4)"><span>余额提现</span></li>
                <li class="whole-two" onclick="getList(1,'',5)"><span>购物</span></li>
                <li class="whole-one" onclick="getList(1,'',6)"><span>${ticket_name}充值</span></li>
            </ul>
        </div>
    </div>          
        <c:if test="${incomeAndExpensesList.size()==0}">
			<div class="zanwu">
				<span><img src="/img/app/zanwu.png"></span>
				<p>暂无记录</p>
			</div>
		</c:if>  
    </div>